#!/bin/bash

# http://www.inprose.com/articles/10-enable-aspnet-support-in-fedora-linux.html

METHOD=yum

# The instructions below also work on other RedHat Linux flavors such as 
# CentOS or maybe Fedora.
# Put the Mono.repo file in the /etc/yum.repo.d/ directory:
MONO_REPO="
[Mono]
name=Mono Stack (RHEL_5)
type=rpm-md
baseurl=http://ftp.novell.com/pub/mono/download-stable/RHEL_5/
gpgcheck=1
gpgkey=http://ftp.novell.com/pub/mono/download-stable/RHEL_5/repodata/repomd.xml.key
enabled=1
"
echo "$MONO_REPO" > /etc/yum.repos.d/mono.repo

# download????
#cd /etc/yum.repos.d/
#wget http://download.opensuse.org/repositories/Mono/RHEL_5/mono.repo

cat /etc/yum.repos.d/mono.repo


echo ##########################################################################
echo yum 4 Mono

# Update system 
yum -y update

echo -------------------------------------------------------------------------
echo erasing previously installed packages
YUM='yum -y erase'

$YUM libgdiplus*
$YUM mono-core mono-data mono-web
$YUM mono*
$YUM xsp*

echo -------------------------------------------------------------------------
echo Update the yum cache to be on the safe side
yum clean all


YUM='yum -y install'

echo -------------------------------------------------------------------------
echo instaling new packages (should be from mono.repo)

$YUM libgdiplus*
$YUM mono-core mono-data mono-web
$YUM mono*
$YUM xsp*


# The installed binaries will end up in "/opt/novell/mono/bin".
# issue the following command to set up shell environment so that it finds 
# mono, mcs and the other mono tools

source /opt/novell/mono/bin/mono-addon-environment.sh

echo ##########################################################################
echo test Mono

mono -V

xsp --version

exit






